<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="theme-color">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <link rel="shortcut icon" href="./favicon.ico">
    <link rel="stylesheet" href="__PUBLIC__/apps/css/reset.css">
    <link rel="stylesheet" href="__PUBLIC__/apps/css/index.css">
    <script src="__PUBLIC__/apps/js/jquery-3.1.1.min.js"></script>
    <title>　金蚂蚁装修网</title>

    <script>!function (e, t) { function i() { var t = r.getBoundingClientRect().width; (function () { for (var e = navigator.userAgent, t = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"), i = !0, a = 0; a < t.length; a++)if (e.indexOf(t[a]) > 0) { i = !1; break } return i })() && t < 2047 && (t = t > 540 ? 540 : t); var i = t / 7.5; r.style.fontSize = i + "px", s.rem = e.rem = i } var a, n = e.document, r = n.documentElement, o = n.querySelector('meta[name="viewport"]'), d = n.querySelector('meta[name="flexible"]'), l = 0, m = 0, s = t.flexible || (t.flexible = {}); if (o) { console.warn("将根据已有的meta标签来设置缩放比例"); var p = o.getAttribute("content").match(/initial\-scale=([\d\.]+)/); p && (m = parseFloat(p[1]), l = parseInt(1 / m)) } else if (d) { var c = d.getAttribute("content"); if (c) { var u = c.match(/initial\-dpr=([\d\.]+)/), f = c.match(/maximum\-dpr=([\d\.]+)/); u && (l = parseFloat(u[1]), m = parseFloat((1 / l).toFixed(2))), f && (l = parseFloat(f[1]), m = parseFloat((1 / l).toFixed(2))) } } if (!l && !m) { e.navigator.appVersion.match(/android/gi); var v = e.navigator.appVersion.match(/iphone/gi), h = (e.navigator.appVersion.match(/ipad/gi), e.devicePixelRatio); m = 1 / (l = v ? h >= 3 && (!l || l >= 3) ? 3 : h >= 2 && (!l || l >= 2) ? 2 : 1 : 1) } if (r.setAttribute("data-dpr", l), !o) if ((o = n.createElement("meta")).setAttribute("name", "viewport"), o.setAttribute("content", "initial-scale=" + m + ", maximum-scale=" + m + ", minimum-scale=" + m + ", user-scalable=no"), r.firstElementChild) r.firstElementChild.appendChild(o); else { var g = n.createElement("div"); g.appendChild(o), n.write(g.innerHTML) } e.addEventListener("resize", function () { clearTimeout(a), a = setTimeout(i, 300) }, !1), e.addEventListener("pageshow", function (e) { e.persisted && (clearTimeout(a), a = setTimeout(i, 300)) }, !1), "complete" === n.readyState ? n.body.style.fontSize = 14 * l + "px" : n.addEventListener("DOMContentLoaded", function (e) { n.body.style.fontSize = 14 * l + "px" }, !1), i(), s.dpr = e.dpr = l, s.refreshRem = i, s.rem2px = function (e) { var t = parseFloat(e) * this.rem; return "string" == typeof e && e.match(/rem$/) && (t += "px"), t }, s.px2rem = function (e) { var t = parseFloat(e) / this.rem; return "string" == typeof e && e.match(/px$/) && (t += "rem"), t } }(window, window.lib || (window.lib = {}))


    </script>

</head>
<body>
    <div class="Liang">
            <div class="nav">
                <a href="{:U('Index/index')}">
                    <首页</a>
                        <p>免费量房</p>
            </div>
            <div class="slider">

            </div>
           
            <div class="bottom">
                <div class="text">
                    <input type="text" placeholder="请输入您的姓名" class="name" id="name">
                </div>

                <div class="text">
                    <input type="text" placeholder="请输入您的手机号" class="phone" id="phone">
                </div>
                <div class="text three">
                    <input type="text" placeholder="请输入您的房屋面积" class="area" id="area">
                    <input type="text" placeholder="请输入您的小区名称" class="xiaoqu" id="comm">
                </div>
                <div class="text">
                    <input type="text" placeholder="请选择您的地区" class="city"  id="expressArea">
                   
                </div>
                <div class="sms">
                    <input type="num" placeholder="请输入验证码" class="code" id="number">
                    <input type='button' id="code" value='获取验证码' onclick="sendMessageDl()">
                </div>
                <button class="button" id="sub">立即预约</button>
            </div>
            <footer>

            </footer>
                <!--选择地区弹层-->
                <section id="areaLayer" class="express-area-box">
                    <header>
                        <h3>选择地区</h3>
                        <a id="backUp" class="back" href="javascript:void(0)" title="返回"></a>
                        <a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
                    </header>
                    <article id="areaBox">
                        <ul id="areaList" class="area-list"></ul>
                    </article>
                </section>
                    <div id="areaMask" class="mask"></div>
    </div>
    <script src="__PUBLIC__/apps/js/jquery.area.js"></script>
    <script>
            $("#sub").click(function(){
                var name=$("#name").val()
                var phone=$("#phone").val()
                var area=$("#area").val()
                var comm=$("#comm").val()
                var city=$("#expressArea").val()
                var code=$("#number").val()
                 if(name == ''){
                            alert('请输入姓名！')
                            return false;
                        }else if(!phone.match(/^1[0-9]{10}$/)){
                            alert('请输入正确的手机号码！')
                            return false;
                        }else if(area == ''){
                            alert('请输入您的房屋面积！')
                            return false;
                        }else if(comm == ''){
                            alert('请输入小区名称！')
                            return false;
                        }else if(city == ''){
                            alert('请选择您的所在城市！')
                            return false;
                        }else if(code == ''){
                            alert('请输入验证码！')
                            return false;
                        }
                $.ajax({
                    type: 'POST',
                    url: '{:U("Mobile/Liang/add")}',
                    data: {
                        name:name,
                        phone:phone,
                        area:area,
                        comm:comm,
                        city:city,
                        code:code
                    },
                    dataType: 'json',
                    success:function(data){
                         if(data.msg==1){
                            alert("计算成功,稍后以短信形式发送给您,请注意查收!")
                            window.location.reload();
                            }else if(data.msg==0){
                                 alert("验证码错误!")
                            }
                        }

                    })
            })
        </script>
</body>
</html>